A storage system typically comprises one or more storage devices into which information may be entered, and from which information may be obtained, as desired. The storage system may be implemented in accordance with a variety of storage architectures including, but not limited to, a network-attached storage environment, a storage area network, and a disk assembly directly attached to a client or host computer.
The storage operating system of the storage system may implement a high-level module, such as a file system, to logically organize the information stored on the disks as a hierarchical structure of directories, files, and blocks. A hierarchical structure of blocks on disks may be exported to host computers (hosts) as named logical unit numbers (LUNs).
Some storage systems provide a mechanism to allow or deny a host computer access to a particular LUN based on the settings specified by the administrator. For example, visibility of LUNs to a particular host may be restricted to a subset of storage server's communications ports. A storage server administrator may create for a user an initiator group (an igroup) comprising one or more host computers so that the user is expected to access the storage server only via the designated hosts. All hosts that are members of an igroup may be restricted to a subset of storage server's communications ports if the igroup is bound to a portset that has one or more port members. Conversely, a host may have access to a storage server via a particular server's communications port by virtue of being a member of a particular igroup if the igroup is bound to a portset that has the particular port as a member.
In order to indicate the LUNs to which the members of a particular igroup have access, an igroup may be mapped to one or more of such LUNs. An administrator may further define a set of ports and bind it to a selected igroup to indicate which ports may be used by the members of the igroups in order to access the LUNs.
In some existing systems, the storage server may be configured such that portset information persist through storage server reboot or power loss. Consequently, portset information, such as a portset metafile, is being stored on a mass storage device (e.g., on disk) each time a portset record is added or updated to a data structure storing portset information. Portset data is retrieved from disk each time the storage server is powered up or rebooted. In a clustered file system, portset data is retrieved from disk each time takeover or giveback occurs. In order to use the portset information when an initiator's access to a target LUN needs to be qualified, portset information is maintained in memory (or in core), in addition to being stored on disk. The portset information that is being stored in memory may be managed by a storage server administrator. Management operations may include, for example, adding a new portset or deleting an existing portset.
Each time an administrator alters portset information, both the in memory and on disk portset data must be updated. In some existing systems, on disk portset metafile uses an array data representation, where each record is associated with a unique index. When a portset is deleted, the index associated with the old record is invalidated. When a new portset is added, a new index is created in the portset metafile. However, an approach where a new index is created each time a new portset is added, may result in memory holes (e.g., after a portset has been deleted that has an index value that is less than the highest index value for the portset records).
Another existing technique to manage portset data comprises maintaining a separate index structure for in memory portset data stored in memory, a separate index structure for on disk portset data, and a mapping between the two separate index structures. When an administrator deletes an existing portset or creates a new portset, the portset data on the disk is first located and changed. Then the index number associated with the on disk portset update is determined, a corresponding index number associated with the in memory portset update is calculated, and, finally, in memory data is populated with the updated portset information. This approach, however, may result in excessive disk read and write operations, which, in turn, may result in decreased performance.